﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.IO;

namespace SharedGenomics.DataAccess
{
    public class MarkerWatchListFileParser : IMarkerWatchListParser
    {
        public ICollection<string> Parse(string filePath)
        {
            HashSet<string> markers = new HashSet<string>();

            using (StreamReader sr = new StreamReader(File.OpenRead(filePath)))
            {
                string currentLine;

                while ((currentLine = sr.ReadLine()) != null)
                {
                    markers.Add(currentLine.Trim());
                }
            }

            return markers;
        }
    }
}
